﻿namespace Softserve.Pottery.Warehouse.Domains
{
    using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Infrastructure.Interfaces;
    using System.Data.Services.Common;
    using System.Runtime.Serialization;

    [DataContract]
    [DataServiceEntity]
    public class Address : IValidatable, IDomain
    {
        #region Property
   
        [DataMember]
        public int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }
        

        [DataMember]
        public string Country
        {
            get { return m_Country; }
            set { m_Country = value; }
        }

        [DataMember]
        public string Region
        {
            get { return m_Region; }
            set { m_Region = value; }
        }

        [DataMember]
        public string City
        {
            get { return m_City; }
            set { m_City = value; }
        }

        [DataMember]
        public string Street
        {
            get { return m_Street; }
            set { m_Street = value; }
        }

        [DataMember]
        public string HouseNumber
        {
            get { return m_HouseNumber; }
            set { m_HouseNumber = value; }
        }

        [DataMember]
        public int Floor
        {
            get { return m_Floor; }
            set { m_Floor = value; }
        }

        [DataMember]
        public string ApartmentNumber
        {
            get { return m_ApartmentNumber; }
            set { m_ApartmentNumber = value; }
        }

        [DataMember]
        public int ZipCode
        {
            get { return m_ZipCode; }
            set { m_ZipCode = value; }
        }

        [DataMember]
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }

        #endregion

        #region IValidatable Members

        public bool Validate()
        {
            return true;
        }

        #endregion

        #region Private filds

        private string m_Country = string.Empty;

        private string m_Region = string.Empty;

        private string m_City = string.Empty;

        private string m_Street = string.Empty;

        private string m_HouseNumber = string.Empty;

        private int m_Floor = default(int);

        private string m_ApartmentNumber = string.Empty;

        private int m_ZipCode = default(int);

        private string m_Description = string.Empty;

        private int m_Id = default(int);

        #endregion
    }
}
